/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:45 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Nguoidung_nhomEntity
    {
        public Nguoidung_nhomEntity()
        {
			m_fk_inguoidungid=0;
			m_fk_inhomnguoidungid=0;
        }
		private Int64 m_fk_inguoidungid;
		public Int64 FK_iNguoidungID
		{
			get { return m_fk_inguoidungid ; }
			set { m_fk_inguoidungid = value; }
		}
		private Int16 m_fk_inhomnguoidungid;
		public Int16 FK_iNhomnguoidungID
		{
			get { return m_fk_inhomnguoidungid ; }
			set { m_fk_inhomnguoidungid = value; }
		}

        #region Comparison
        public static List<Nguoidung_nhomEntity> Sort(List<Nguoidung_nhomEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Nguoidung_nhomEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Nguoidung_nhomEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Nguoidung_nhomEntity> COMPARISON_FK_iNguoidungID
		{
			get
			{
				return delegate(Nguoidung_nhomEntity entity,Nguoidung_nhomEntity other)
				{
					return entity.FK_iNguoidungID.CompareTo(other.FK_iNguoidungID);
				};
			}
		}
		public static Comparison<Nguoidung_nhomEntity> COMPARISON_FK_iNhomnguoidungID
		{
			get
			{
				return delegate(Nguoidung_nhomEntity entity,Nguoidung_nhomEntity other)
				{
					return entity.FK_iNhomnguoidungID.CompareTo(other.FK_iNhomnguoidungID);
				};
			}
		}
        #endregion
    }
}
